﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MSellDetailReport.aspx.cs" Inherits="IHISCETeim.Web.MachineSys.MarketModel.MSellDetailReport" %>

<form id="pagerForm" method="post" action="MarketModel/MSellDetailReport.aspx">
<input type="hidden" name="BuyDateFrom" value="<%=BuyDateFrom %>" />
<input type="hidden" name="BuyDateTo" value="<%=BuyDateTo %>" />
<input type="hidden" name="ItemName" value="<%=ItemName %>" />
<input type="hidden" name="orderField" value="<%=orderField %>" />
<input type="hidden" name="orderDirection" value="<%=orderDirection %>" />
</form>
<form id="form1" runat="server" method="post" action="MarketModel/MSellDetailReport.aspx" onsubmit="return navTabSearch(this);">
<div class="pageHeader">
    <div class="searchBar">
        <table class="searchContent">
            <tr>
                <td>
                    请选择日期区间:
                </td>
                <td>                   
                   从<input name="BuyDateFrom" type="text" value="<%=BuyDateFrom.ToString("yyyy-MM-dd") %>"  class="date"/>
                   到<input name="BuyDateTo" type="text" value="<%=BuyDateTo.ToString("yyyy-MM-dd") %>"  class="date"/>
                </td>
                <td>
                    经销商名称(或其它):
                </td>
                <td>
                    <input name="ItemName" type="text" value="<%=ItemName %>" />
                </td>
                <td>
                    <div class="subBar">
            <ul>
                <li>
                    <div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div>
                </li>
                <li>
                    <div class="buttonActive"><div class="buttonContent" ><a target="_blank" style=" line-height:25px!important;" href="MarketModel/Execl/ExportMSellDetailReport.aspx?BuyDateFrom=<%=BuyDateFrom %>&BuyDateTo=<%=BuyDateTo %>&ItemName=<%=ItemName %>">导出</a></div></div>
                </li>
            </ul>
        </div>
                </td>
            </tr>
        </table>
    </div>
</div>
<div class="pageContent">
    
     <asp:repeater id="rpMenu" runat="server">
        <HeaderTemplate>
        <table class="table" width="1000"  layouth="85" targetType="dialog">
        <thead>
            <tr  >
                <th width="120">
                    物料名称
                </th>                
                <th width="100">
                    出库数量
                </th>
                <th width="100">
                    出库金额
                </th> 
                <th width="70" >
                    单价
                </th> 
                <th width="60" orderField="BuyDate" class="asc">
                    出库时间
                </th>       
                <th >
                    经销商名称(或其它)
                </th>
                <th  >
                    收货人
                </th>
                 <th  >
                    联系电话
                </th>
                 <th  >
                    物流名称
                </th>
                 <th  >
                    发货单号
                </th>
                 <th  >
                    是否收费
                </th>
                 <th  >
                    收费金额
                </th>
            </tr>
        </thead>
        <tbody>
        </HeaderTemplate>
        <ItemTemplate>
            <tr>
				<td><%# Eval("ItemName")%></td>
				<td><%# Convert.ToInt32(Eval("SellNum"))%></td>
                <td><%# (Convert.ToDecimal(Eval("SellNum")) * Convert.ToDecimal(Eval("SellPrice"))).ToString("F2")%></td>
				<td><%# Convert.ToDecimal(Eval("SellPrice")).ToString("F2")%></td>
                <td><%# Eval("SellDate")%></td>
                <td><%# Eval("AgentName")%></td>
                <td><%# Eval("Consignee")%></td>
                <td><%# Eval("ConsigneeTel")%></td>
                <td><%# Eval("ExpressMode")%></td>
                <td><%# Eval("InvoiceNum")%></td>
                <td>
                    <%# Convert.ToBoolean(Eval("IsSell"))?"是":"否"%>
                </td>
                <td><%# Eval("SellTotalMoney")%></td>
			</tr>
        </ItemTemplate>
        <FooterTemplate>
            </tbody>
         </table>
        </FooterTemplate>
    </asp:repeater>
    <div class="panelBar">  
        <table width="100%" class="table">
           <thead>
            <tr>
                <th width="120" align="right"><b>合计:</b></th>
                <th  align="center" width="100"><b style="color:red;"><%=Convert.ToDecimal(SUMDT.Rows[0]["SellNum"]==DBNull.Value?"0":SUMDT.Rows[0]["SellNum"]).ToString("F2")%></b></th>
                <th width="100"><b style="color:red;"><%=Convert.ToDecimal(SUMDT.Rows[0]["totlemoney"]==DBNull.Value?"0":SUMDT.Rows[0]["totlemoney"]).ToString("F2")%></b></th>
                
                <th>&nbsp;</th>
            </tr>
        </thead>
        </table>
    </div>
</div>
</form>
